{include file="public/_meta" /}

<title>基本设置</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
	<span class="c-gray en">&gt;</span>
	系统管理
	<span class="c-gray en">&gt;</span>
	基本设置
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" onclick="ooo()" title="清楚缓存" ><i class="Hui-iconfont">&#xe706;</i></a>
</nav>
<div class="page-container">
	<form class="form form-horizontal" id="form-article-add">
		<div id="tab-system" class="HuiTab">
			<div class="tabBar cl">
				<span>基本设置</span>
				<span>对公账户</span>
			</div>
			<div class="tabCon">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>网站状态：</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						<div class="radio-box">
							<input name="zt" type="radio" value="1" id="">
							<label for="sex-1">在线</label>
						</div>
						<div class="radio-box">
							<input type="radio" value="0" id="" name="zt">
							<label for="sex-2" class="c-red">关闭</label>
						</div>
					</div>
				</div>
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						兑换手续费：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="recharge"  value="{$info.recharge}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						后台背景：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<img class="preview tx" src="{$info.background}">-->
<!--						<input type="file"  id="file_upload" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
				<input type="hidden" id="background" name="background">
		</div>
<!--		<div class="tabCon">-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						开户银行地址：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="bank_address"  value="{$info.bank_address}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						收款账户：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="bank_number"  value="{$info.bank_number}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						公司名称：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="company"  value="{$info.company}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--				<div class="row cl">-->
<!--					<label class="form-label col-xs-4 col-sm-2">-->
<!--						<span class="c-red">*</span>-->
<!--						电话：</label>-->
<!--					<div class="formControls col-xs-8 col-sm-9">-->
<!--						<input type="text" name="phone"  value="{$info.phone}" class="input-text" style="width:20%">-->
<!--					</div>-->
<!--				</div>-->
<!--		</div>-->
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button onclick="return saveConfig();" class="btn btn-primary radius" type="submit"><i clsass="Hui-iconfont">&#xe632;</i> 保存</button>
<!--				<button class="btn btn-default radius rst" type="reset">&nbsp;&nbsp;重置&nbsp;&nbsp;</button>-->
			</div>
		</div>
	</form>
</div>
{include file="public/_footer" /}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
$('.form input[name="zt"][value='+"{$info.zt}"+']').attr("checked",true);
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#tab-system").Huitab({
		index:0
	});
});
// /setting/saveinfo
function saveConfig(){
	$.post("{:url('setting/index')}",$('.form').serialize()).success(function(data){
		layer.msg(data.msg);
		if(!data.code){
			$('.rst').click();
		}
	});
	return false;
}
function ooo(){
	$.post("{:url('cron/clear')}").success(function(data){
		layer.msg('清楚成功');
	});
	return false;
}
$("#file_upload").change(function() {
        //提交
        var data = new FormData();
        // console.log($(this)[0].files[0]);
        data.append('img',$(this)[0].files[0]);
        $.ajax({
            url: '{:url("tupian")}',
            type: 'POST',
            data: data,
            cache: false,
            contentType: false,
            processData: false,
            success: function(data) {
            	if(data.code){
            		$('#background').val(data.data);
                	$('.preview').attr('src', data.data);
            	}else{
            		layer.msg(data.msg);
            	}
            	
            },
            error: function() {
                layer.msg('上传出错');
            }
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
